//
//  UIFactory.swift
//  SinaWeibo25
//
//  Created by apple on 16/3/12.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

class UIFactory {
        
        //抽象方法
        class func labelFactory(text: String,textColor: UIColor, fontSize: CGFloat,alignment: NSTextAlignment = .Center) -> UILabel {
            let l = UILabel.labelWith(text, textColor: textColor, fontsize: fontSize,alignment: alignment)
            return l
        }
        
        
        // 背景图片 + 图片的按钮的显示样式
        class func buttonWithImage(imageName: String, backImageName: String) -> UIButton {
            let btn = UIButton.buttonWithImage(imageName, backImageName: backImageName)
            return btn
            
        }
        
        
        //背景图片 + 文字 样式的按钮
    class func buttonWithtitle(title: String ,backImageName: String?,textColor: UIColor,fontSize: CGFloat,imageName: String? = nil) -> UIButton {
            let btn = UIButton.buttonWithtitle(title, backImageName: backImageName, textColor: textColor, fontsize: fontSize,imageName: imageName)
            return btn
        }
 }